//package com.example.xd.Config;
//
//import org.springframework.context.annotation.Configuration;
//import org.springframework.format.FormatterRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//import java.time.LocalDateTime;
//import java.time.format.DateTimeFormatter;
//import java.util.Locale;
//
//@Configuration
//public class WebMvcConfig implements WebMvcConfigurer {
//
//    @Override
//    public void addFormatters(FormatterRegistry registry) {
//        // 定义LocalDateTime类型的格式化转换器
//        registry.addFormatter(new org.springframework.format.datetime.standard.DateTimeFormatterRegistrar() {
//            @Override
//            public void registerFormatters(FormatterRegistry registry) {
//                DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSX")
//                        .withLocale(Locale.US);
//                registry.addFormatterForFieldType(LocalDateTime.class, new org.springframework.format.datetime.standard.TemporalAccessorFormatter(dateTimeFormatter));
//            }
//        });
//    }
//}